package com.itheima.fanxing;

import java.util.ArrayList;

/*
类型通配符 下限
 */
public class Demo10 {

    public static void main(String[] args) {
        ArrayList<Integer> list1 = new ArrayList<>();
        //sing(list1);
        ArrayList<Double> list2 = new ArrayList<>();
       // sing(list2);
        ArrayList<Number> list3 = new ArrayList<>();
        sing(list3);
        ArrayList<String> list4 = new ArrayList<>();
       // sing(list4);
        ArrayList<Object> list5 = new ArrayList<>();
        sing(list5);


    }

    public static void sing(ArrayList<? super Number> list){

        for (Object o : list) {
            System.out.println(o);
        }

    }
}
